
public class OccurenceArray {
	public static void main(String args[])
	{
		int a[]={7,7,4,9,9,9,8,1,1,2,2,5,5,5};
		
		int len=a.length;
		
		int count=0;
		for (int i = 0; i< len; i++) { 
			count=1;
		 for(int j=i+1;j<len;j++)
			 
			if (a[j] == a[i])
				count++;
				
				
		
			System.out.println(a[i]+"occurs"+count+"times");
			
			
		}
	}
}
		






